package com.clss.emergencycall.bean

import com.google.gson.JsonElement
import com.google.gson.JsonObject


/**
 * stomp消息的所有消息体
 */

/** stomp消息体的基本类 */
data class StompMessageEntity(var body : JsonElement?,
                              var id : String?,
                              var from : String?,
                              var event : String?,
                              var receiver : String?,
                              var time : String?){
    constructor(id : String, from: String, event: String,type:String) : this(null, id, from, event, null, null)
    constructor(id : String, from: String, event: String) : this(null, id, from, event, null, null)
    constructor(event : String) : this(null, null, null, event, null, null)

    /** 一个是caseId 一个是报警专用权限验证   checkServiceName这个参数不是报警不用传*/
    fun getNeedBean(caseIds:String,isFrarm:Boolean){
        val jsonObject = JsonObject()
        jsonObject.addProperty("caseId",caseIds)
        if (isFrarm){
            jsonObject.addProperty("checkServiceName","alarmReceiveCheckImpl")
        }
        body = jsonObject
    }
    var text = ""


}

/** 发送定位信息的消息体 */
data class StompLocationInfoBodyBean(val lat : String?,
                                     val lng : String?,
                                     val address : String?,
                                     val userId : String?,
                                     val txId : String?){
    var  from : String?= ""
}
